const TODO_KEY = "todos"
const ID_KEY = "newId"

export default {
  getTodos(){
    return JSON.parse(localStorage.getItem(TODO_KEY)?localStorage.getItem(TODO_KEY):'[]')
  },
  setTodos(val){
    localStorage.setItem(TODO_KEY,JSON.stringify(val))
  },
  getIds(){
    return JSON.parse(localStorage.getItem(ID_KEY)?localStorage.getItem(ID_KEY):'1')
  },
  setIds(val){
    localStorage.setItem(ID_KEY,JSON.stringify(val))
  }
}
